/**
 * This program is free software but WITHOUT ANY WARRANTY OR CONDITIONS OF ANY KIND.
 *
 * Copyright (C) 2008-2012 www.pretty-tools.com
 */

const WEBSLIDESHOW_UPDATE_RULES_EVENT = "webslideshow-update-rules";

/**
 * Web Page Profile
 */
function wsshWebDomainProfile(domain, pages)
{
    this._domain = domain;
    this._pages = !!pages ? pages : (domain ? new Array() : null);
    this._signature = null;
    this._checksum = null;
    this.hidden = false;
    this.wrappedJSObject = this;
}

wsshWebDomainProfile.prototype = {
    get domain() { return this._domain; },
    set domain(domain) { this._domain = domain; },
    get pages() { return this._pages; },
    set pages(pages) { this._pages = pages; },
    get signature() { return this._signature; },
    set signature(signature) { this._signature = signature; },
    get checksum() { return this._checksum; },
    set checksum(checksum) { this._checksum = checksum; }
}

wsshWebDomainProfile.prototype.QueryInterface = function(aIID)
{
    if (!aIID.equals(Components.interfaces.wsshIWebDomainProfile) && !aIID.equals(Components.interfaces.nsISupports))
        throw Components.results.NS_ERROR_NO_INTERFACE;

    return this;
}

/**
 * Web Page Profile
 */
function wsshWebPageProfile()
{
    this.tagToUrl = {
        "IMG"  : "src",
        "A"    : "href",
        "AREA" : "href"
    };
    this._supported = true;
    this._disabled = false;
    this._browser = null;
    this._elementTag = null;
    this._elementTemplate = null;
    this.wrappedJSObject = this;
}

wsshWebPageProfile.prototype = {
    get supported() { return this._supported; },
    set supported(supported) { this._supported = supported; },
    get disabled() { return this._disabled; },
    set disabled(disabled) { this._disabled = disabled; },
    get browser() { return this._browser; },
    set browser(browser) { this._browser = browser; },
    get elementTag() { return this._elementTag; },
    set elementTag(elementTag) { this._elementTag = elementTag; },
    get elementTemplate() { return this._elementTemplate; },
    set elementTemplate(elementTemplate) { this._elementTemplate = elementTemplate; }
}

wsshWebPageProfile.prototype.QueryInterface = function(aIID)
{
    if (!aIID.equals(Components.interfaces.wsshIWebPageProfile) && !aIID.equals(Components.interfaces.nsISupports))
        throw Components.results.NS_ERROR_NO_INTERFACE;

    return this;
}
